package com.szy.system.common.monitor;

/**
 * @author : zhenyun.su
 * @comment : 保证多线程环境下，每个线程统计时间正确
 * @since : 2020/1/21
 */

@Deprecated
public class PerformanceMonitor {
    private static ThreadLocal<PerformanceTime>  time = new ThreadLocal<PerformanceTime>();

    public static void startMonitor(String methodName){
        time.set(PerformanceTime.of(methodName));
    }

    public static long stopMonitor(){
        return time.get().calcTime();
    }
    public static String calcTimeString(){
        return time.get().calcTimeString();
    }
}
